package com.paireach.bw.utils;

import android.util.Log;

import com.baidu.location.BDLocation;
import com.baidu.trace.TraceLocation;

/**
 * Created by ${cqc} on 2016/9/19.
 */
public class LogUtil {
    public static boolean flag = true;

    public static void d(String TAG, String content) {
        if (flag) {
            Log.d(TAG, content);
        }
    }

    //
    public static void d(String content) {
        if (flag) {
            Log.d("LogUtil", content);
        }
    }

    public static void dLocation(TraceLocation traceLocation) {
        if (flag) {
            LogUtil.d("LogUtil", "queryRealtimeLoc--onReceiveLocation--traceLocation=" + "\n" +
                    "getLatitude = " + traceLocation.getLatitude() + "\n" +
                    "getLongitude = " + traceLocation.getLongitude() + "\n" +
                    "getTime = " + traceLocation.getTime() + "\n" +
                    "getBuilding = " + traceLocation.getBuilding() + "\n" +
                    "getFloor = " + traceLocation.getFloor() + "\n" +
                    "getIndoor = " + traceLocation.getIndoor() + "\n" +
                    "getAltitude = " + traceLocation.getAltitude() + "\n" +
                    "getCoordType = " + traceLocation.getCoordType() + "\n" +
                    "getDirection = " + traceLocation.getDirection() + "\n" +
                    "getRadius = " + traceLocation.getRadius() + "\n" +
                    "getSpeed = " + traceLocation.getSpeed());
        }
    }
    public static void dLocation(BDLocation traceLocation) {
        if (flag) {
            LogUtil.d("LogUtil", "BDLocation=" + "\n" +
                    "getLatitude = " + traceLocation.getLatitude() + "\n" +
                    "getLongitude = " + traceLocation.getLongitude() + "\n" +
                    "getTime = " + traceLocation.getTime() + "\n" +
                    "getFloor = " + traceLocation.getFloor() + "\n" +
                    "getAltitude = " + traceLocation.getAltitude() + "\n" +
                    "getDirection = " + traceLocation.getDirection() + "\n" +
                    "getRadius = " + traceLocation.getRadius() + "\n" +
                    "getSpeed = " + traceLocation.getSpeed());
        }
    }
}
